package com.dongdongshop.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbUserScoreAccountMapper;
import com.dongdongshop.pojo.TbUserScoreAccount;
import com.dongdongshop.pojo.TbUserScoreAccountExample;
import com.dongdongshop.service.UserScoreAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * @Description
 * @ClassName UserScoreAccountServiceImpl
 * @Author RC
 * @date 2020.12.27 17:53
 */
@Component
@Service
public class UserScoreAccountServiceImpl implements UserScoreAccountService {
    @Autowired
    private TbUserScoreAccountMapper tbUserScoreAccountMapper;

    @Override
    public TbUserScoreAccount findInfoByUserId(String userId) {

        return tbUserScoreAccountMapper.findInfoByUserId(userId);
    }

    @Override
    public void saveUsa(TbUserScoreAccount usa) {
        tbUserScoreAccountMapper.insertSelective(usa);
    }

    @Override
    public void update(TbUserScoreAccount user) {
        tbUserScoreAccountMapper.updateByPrimaryKeySelective(user);
    }
}
